function multiply(a, b) {
    // 先将数字转换为字符串
    let strA = a.toString();
    let strB = b.toString();
    // 先获取两个数的小数位数
    let lenA = (strA.indexOf(".") == -1) ? 0 : (strA.length - strA.indexOf(".") - 1);
    let lenB = (strB.indexOf(".") == -1) ? 0 : (strB.length - strB.indexOf(".") - 1);
    // 比较两数的精度，精度大的作为结果数精度
    maxLen = Math.max(lenA, lenB);
    // 计算运算结果
    let result = null;
    result = parseFloat(a * b).toFixed(maxLen);
    return result;
}

function alterContext(fn, obj) {
    return fn.call(obj)
}

function alterContext(fn, obj) {
    return fn.apply(obj)
}

function alterContext(fn, obj) {
    return fn.bind(obj)()
}

function alterContext(fn, obj) {
    obj.fn = fn;
    return obj.fn();
}

function multiply(a, b) {
    let stra = a.toString()
    let strb = b.toString()
    let lena = stra.indexOf('.') > 0 ? (stra.length - stra.indexOf('.') - 1) : 0
    let lenb = strb.indexOf('.') > 0 ? (strb.length - strb.indexOf('.') - 1) : 0
    let len = Math.max(lena, lenb)
    return parseFloat(a * b).toFixed(len)
}

function alterObjects(constructor, greeting) {
    constructor.prototype.greeting = greeting
}